Skip to main content

Storage Optimization

When all separators are installed, each storage space is one cubic meter (1' x 1' x 1'). Determine the volume of the largest space when a series of horizontal and vertical separators are removed.

Algorithm: Track which separators are removed and remove those nums from a set. Then go through and get the biggest gap for width and height. Remember go from 1 to n+1.